﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using PB.FBConnect;

namespace PB.FBMembershipWebApp.Gen
{
    public partial class Logout : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {          
            
            DoLogout();
            
        }

        private void DoLogout()
        {
            if (Request.IsAuthenticated)
            {
                FormsAuthentication.SignOut();
                Roles.DeleteCookie();
                Session.Clear();
                Response.Redirect("~/Gen/Logout.aspx", true);
            }          

        }
    }
}
